
\begin{apiRoute}{GET}{/stamp?offset=\param{offset}\&length=\param{length}}{View all postage stamps}
{
}
{ }
\begin{queryParameter} 
\queryParamItem{offset}{integer}
\queryParamItem{length}{integer}
\end{queryParameter}

\begin{routeResponse}{application/json}
\responseItem{200}{ok}{}
\end{routeResponse}
\end{apiRoute}



\begin{apiRoute}{GET}{/stamp/\param{id}}{View postage stamp with id}
{
}
{ }

\begin{routeParameter} 
\routeParamItem{id}{}
\end{routeParameter}
\begin{routeResponse}{application/json}
\responseItem{200}{ok}{}
\responseItem{400}{Bad Request}{ID not well formed}
\responseItem{404}{Not found}{Stamp with ID does not exists.}
\end{routeResponse}
\end{apiRoute}




\begin{apiRoute}{PUT}{/stamp/\param{id}}{Top up postage stamp with id}
{
}
{ }

\begin{routeParameter} 
\routeParamItem{id}{}
\end{routeParameter}
\begin{queryParameter} 
\queryParamItem{amount}{integer}
\end{queryParameter}

\begin{routeResponse}{application/json}
\responseItem{200}{ok}{}
\responseItem{400}{Bad Request}{ID not well formed}
\responseItem{404}{Not found}{Stamp with ID does not exists.}
\end{routeResponse}
\end{apiRoute}



\begin{apiRoute}{DELETE}{/stamp/\param{id}}{Drain and expire stamp with id}
{
}
{ }

\begin{routeParameter} 
\routeParamItem{id}{}
\end{routeParameter}
\begin{routeResponse}{application/json}
\responseItem{200}{ok}{}
\responseItem{400}{Bad Request}{ID not well formed}
\responseItem{404}{Not found}{Stamp with ID does not exists.}
\end{routeResponse}
\end{apiRoute}


\begin{apiRoute}{POST}{/stamp/}{Create a new postage stamp, return ID in reponse body}
{
}
{ }

\begin{routeParameter} 
\end{routeParameter}
\begin{routeResponse}{application/json}
\responseItem{201}{created}{ID in response body}
\end{routeResponse}
\end{apiRoute}
